//package com.czy.basecommon.utils.binding.viewadapter.swiperefresh;
//
//
//import androidx.databinding.BindingAdapter;
//
///**
// * Created by goldze on 2017/6/18.
// */
//public class ViewAdapter {
//    //下拉刷新命令
//    @BindingAdapter({"onRefreshCommand"})
//    public static void onRefreshCommand(SwipeRefreshLayout swipeRefreshLayout, final BindingCommand onRefreshCommand) {
//        swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
//            @Override
//            public void onRefresh() {
//                if (onRefreshCommand != null) {
//                    onRefreshCommand.execute();
//                }
//            }
//        });
//    }
//
//    //是否刷新中
//    @BindingAdapter({"refreshing"})
//    public static void setRefreshing(SwipeRefreshLayout swipeRefreshLayout, boolean refreshing) {
//        swipeRefreshLayout.setRefreshing(refreshing);
//    }
//
//}
